package com.lzj.demo.collection.list;

import java.util.Arrays;
import java.util.List;

public class ZdfPartition {
    private static final List<String> _OLD_LIST = Arrays.asList(
            "唐僧,悟空,八戒,沙僧,曹操,刘备,孙权".split(","));

    public static void main(String[] args) {
        // 集合分隔
        List<String> list = _OLD_LIST.subList(0, 3);
        // 打印集合中的元素
        list.forEach(i -> {
            System.out.println(i);
        });
    }
}
